package com.ofhb.webapp.client.ui.searchforms;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextBox;

public class UserSearchForm extends FlexTable{
	public UserSearchForm() {
		setCellSpacing(5);
		setSize("100%", "100%");
		
		Label lblUserSearch = new Label("User Search :");
		lblUserSearch.setStyleName("app-form-header-lbl");
		setWidget(0, 0, lblUserSearch);
		
		FlexTable ftBase = new FlexTable();
		setWidget(1, 0, ftBase);
		ftBase.setWidth("100%");
		
		FlexTable ftForm = new FlexTable();
		ftForm.setCellSpacing(5);
		ftBase.setWidget(0, 0, ftForm);
		
		Label lblUserName = new Label("User Name");
		lblUserName.setStyleName("app-form-field-lbl");
		ftForm.setWidget(0, 0, lblUserName);
		
		TextBox textBox = new TextBox();
		textBox.setVisibleLength(35);
		textBox.setMaxLength(35);
		ftForm.setWidget(0, 1, textBox);
		
		Label lblFirstName = new Label("First name");
		lblFirstName.setStyleName("app-form-field-lbl");
		ftForm.setWidget(0, 2, lblFirstName);
		
		TextBox textBox_1 = new TextBox();
		textBox_1.setMaxLength(64);
		textBox_1.setVisibleLength(25);
		ftForm.setWidget(0, 3, textBox_1);
		
		Label lblLastName = new Label("Last Name");
		lblLastName.setStyleName("app-form-field-lbl");
		ftForm.setWidget(0, 4, lblLastName);
		
		TextBox textBox_2 = new TextBox();
		textBox_2.setVisibleLength(25);
		textBox_2.setMaxLength(64);
		ftForm.setWidget(0, 5, textBox_2);
		
		Label lblContactNumber = new Label("Contact Number");
		lblContactNumber.setWordWrap(false);
		lblContactNumber.setStyleName("app-form-field-lbl");
		ftForm.setWidget(1, 0, lblContactNumber);
		
		TextBox textBox_3 = new TextBox();
		textBox_3.setVisibleLength(10);
		textBox_3.setMaxLength(10);
		ftForm.setWidget(1, 1, textBox_3);
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		setWidget(2, 0, horizontalPanel);
		horizontalPanel.setSpacing(5);
		
		Button btnSearch = new Button("Search");
		horizontalPanel.add(btnSearch);
		btnSearch.setWidth("75px");
		
		Button btnNewButton = new Button("Reset");
		horizontalPanel.add(btnNewButton);
		btnNewButton.setWidth("75px");
		
		Button btnAddNewHall = new Button("Add New Hall");
		horizontalPanel.add(btnAddNewHall);
		getCellFormatter().setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_LEFT);
	}

}
